package cn.smbms.service;

import cn.smbms.dao.UserDao;
import cn.smbms.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 用户业务接口实现类
 *
 * @author Kane
 * @create 2019--28 17:45
 */
@Service
public class UserServiceImpl implements UserService{
    @Autowired
    private UserDao userDao;
    @Override
    public User findLoginUser(String userCode, String userPassword) {
        User user = userDao.getLoginUser(userCode);
        if(user != null && !userPassword.equals(user.getUserPassword())){
            user = null;
        }
        return user;
    }
}
